package com.xin.jdbc_utils;

import org.w3c.dom.ls.LSOutput;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

public class utiltest {
    public static void main(String[] args) {
        Connection conn=null;
        Statement sta=null;
        ResultSet re=null;
        try {
            conn=DBUtil.getConnection();
            sta=conn.createStatement();
            int i = sta.executeUpdate("insert into stu_information set stu_id=20, stu_name='lily'");
            System.out.println( i==1? "执行成功":"执行失败");
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            DBUtil.close(conn,sta,re);
        }
    }
}
